<?php
declare (strict_types=1);

namespace app\admin\validate;

use think\Validate;

class ArticleValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
//        'title|文章标题'       => 'require|max:80',
        'thumb|文章缩略图'      => 'require|max:100',
        'content|文章内容'     => 'max:5000',
        'author|文章作者'      => 'max:20',
        'keywords|文章关键词'   => 'max:30',
        'type|文章类型'        => 'require|between:1,4',
        'status|文章状态'      => 'require|in:1,2',
        'description|文章摘要' => 'max:200',
        'sort|文章排序'        => 'integer|between:0,10000',
    ];

}
